const debounceConfig = {
  delay: 500 // 默认的延迟时间
};

const debounceMixin = {
  data() {
    return {
      debounceTimer: null
    };
  },
  methods: {
    debounce(func, delay) {
      clearTimeout(this.debounceTimer);
      this.debounceTimer = setTimeout(func, delay);
    }
  }
};

export { debounceConfig, debounceMixin };